<?php
/* @var $this BookableResourceController */
/* @var $model BookableResource */
/* @var $form BSActiveForm */
?>

<div class="form">

    <?php $form=$this->beginWidget('bootstrap.widgets.BsActiveForm', array(
	'id'=>'bookable-resource-form',
    'htmlOptions'=>array('enctype'=>'multipart/form-data'),
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
	'layout' => BSHtml::FORM_LAYOUT_HORIZONTAL,
)); ?>

    <p class="help-block">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>

            <?php echo $form->textFieldControlGroup($model,'timeslot_id'); ?>

            <?php echo $form->textFieldControlGroup($model,'resource_id'); ?>

            <?php echo $form->textFieldControlGroup($model,'resource_amount'); ?>

            <?php echo $form->textFieldControlGroup($model,'unit_price',array('maxlength'=>10)); ?>

            <?php echo $form->textFieldControlGroup($model,'price_expression',array('maxlength'=>100)); ?>

            <?php echo $form->textFieldControlGroup($model,'booking_open_time',array('maxlength'=>45)); ?>

            <?php echo $form->textFieldControlGroup($model,'booking_end_time',array('maxlength'=>45)); ?>

            <?php echo $form->textFieldControlGroup($model,'repeat_start_time',array('maxlength'=>45)); ?>

            <?php echo $form->textFieldControlGroup($model,'repeat_end_time',array('maxlength'=>45)); ?>

            <?php echo $form->textFieldControlGroup($model,'priority'); ?>

            <?php //echo $form->textFieldControlGroup($model,'image_urls',array('maxlength'=>1024)); ?>

            <?php echo '<div class="form-group">
		<label class="control-label col-lg-2" for="BookableResource_image_urls">Resource Image</label>
		<div class="col-lg-10">
		<div class="fileinput fileinput-new" data-provides="fileinput">
				<div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
				<div>
				<span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span class="fileinput-exists">Change</span><input type="file" name="BookableResource[imageFile]" id="BookableResource_imageFile"></span>
				<a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
				</div>
				</div></div></div>'?>
				
            <?php echo BSHtml::formActions(array(
    BSHtml::submitButton('Submit', array('color' => BSHtml::BUTTON_COLOR_PRIMARY)),
)); ?>

    <?php $this->endWidget(); ?>

</div><!-- form -->